<?php

class Work
{
    private $hour;
    private $state;
    private $is_work_finish = false;

    public function setWorkFinish()
    {
        $this->is_work_finish = true;
    }

    public function getWorkState()
    {
        return $this->is_work_finish;
    }

    public function setHour($hour)
    {
        $this->hour = $hour;
    }

    public function getHour()
    {
        return $this->hour;
    }

    public function setState(State $state)
    {
        $this->state = $state;
    }

    public function writeProgram()
    {
        $this->state->writeProgram($this);
    }
}